import requests

import config


def login(username, password):
    url_login = f'{config.URL}/wx/auth/login'
    headers_data = {
        'Content-Type': 'application/json'
    }
    test_data = {
        'username': username,
        'password': password
    }
    return requests.post(url=url_login, headers=headers_data, json=test_data)



if __name__ == '__main__':
    r = login(config.username, config.password)
    print(r.json())